-
Notifications
You must be signed in to change notification settings - Fork 63
Add Python 2.6 support. #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello Charles, I was rather thinking about a Py3x support (in the future) than a Py26 (back porting) support Would it be an alternative, if we create a py26 branch to collect your changes, but not merge them into main? Greetings Luiko |
The problematic line uses a Py31 feature, back ported to Py27
|
The patch is to avoid:
To create an alternative will be fine for me. Depend on your plan. |
I will try to build up a PY26 test environment during the next week and then look, how I could integrated your patch. |
My environmentos: ubuntu 10.04 The log of pip install(testlink)[8:31][charz@Ivy: ~/personal] $ pip install TestLink-API-Python-client
Downloading/unpacking TestLink-API-Python-client
Downloading TestLink-API-Python-client-0.4.7.zip (74kB): 74kB downloaded
Running setup.py (path:/home/charz/ENV/testlink/build/TestLink-API-Python-client/setup.py) egg_info for package TestLink-API-Python-client
Installing collected packages: TestLink-API-Python-client
Running setup.py install for TestLink-API-Python-client
SyntaxError: ('invalid syntax', ('/home/charz/ENV/testlink/lib/python2.6/site-packages/testlink/testlinkapigeneric.py', 931, 46, ' return {nameList[x] : valueList[x] for x in range(len(nameList)) }\n'))
Successfully installed TestLink-API-Python-client
Cleaning up...
About xmlrpc problemThe problem of xmlrpclib.py in py26 is can't decode the xml data from testlink. It seem add '\n' in front of xml data. It broken the xml parsing. Modify xmlrpclib.py def feed(self, data):
print '#%s#'% data
_data = data.strip('\n')
print '#%s#'% _data
self._parser.Parse(_data, 0) Response from testlink#
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<string> Testlink API Version: 1.0 initially written by Asiel Brumfield
with contributions by TestLink development Team</string>
</value>
</param>
</params>
</methodResponse>
#
#<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<string> Testlink API Version: 1.0 initially written by Asiel Brumfield
with contributions by TestLink development Team</string>
</value>
</param>
</params>
</methodResponse># Hope these information can help you. |
Hello Charles, I found an additional precondition for Py26: the module argparse must be installed (see release notes). I tested it with
Greetings Luiko |
Hi Luiko, I tested pre-release v0.4.8 beta, It works fine on my environments include Py26(ubuntu 10.04) andPy27 (ubuntu 12.04). About the testlink(1.9.3) problem, I think that should be fixed in newer version. Thanks |
Hi Lczub,
I found the piece of code can't work on Python 2.6. And I do some modify. Please review it.
Thanks,
Charles